﻿using Super.Admin.Models.User;
using Super.Admin.Utils.EventAggregator;

namespace Super.Admin.Global
{
    public class AppContext
    {
        public static readonly Lazy<AppContext> _instance = new Lazy<AppContext>(() => new AppContext());
        public static AppContext Instance => _instance.Value;
        private AppContext() { }
        /// <summary>
        /// 当前登录的账号
        /// </summary>
        public UserDetatilModel LoginUserModel { set; get; } = new UserDetatilModel();

        /// <summary>
        /// 当前登录的账号的权限列表
        /// </summary>
        public List<string> AuthPermissionList = new List<string>();
        /// <summary>
        /// 事件聚合器，用于发布和订阅事件
        /// </summary>
        public readonly List<SubscriptionToken> EventTokenList = new List<SubscriptionToken>();
        /// <summary>
        /// Gitee路径
        /// </summary>
        public readonly string GiteeUri = "https://gitee.com/YuanXiaoHai/super-admin";
        /// <summary>
        /// 图标路径 ico
        /// </summary>
        public readonly string SuperLogoIcon = "Super.Admin.Assets.Image.Logo.ico";
        /// <summary>
        /// 图标路径
        /// </summary>
        public readonly string SuperLogoImage = "Super.Admin.Assets.Image.Logo.png";
        /// <summary>
        /// 字体路径
        /// </summary>
        public readonly string IconFont = "Super.Admin.Assets.Fonts.iconfont.ttf";
        /// <summary>
        /// 版本号
        /// </summary>
        public readonly string Version = "1.0.0";
    }
}
